import request from '@/api'

export function get<T>(url, params?): Promise<T> {

    return new Promise((resolve, reject) => {
        request.get(url, {
            params
        }).then(response => {
            resolve(response.data);
        }).catch(err => {
            reject(err.data)
        })
    })
}